#define _CRT_SECURE_NO_WARNINGS

int GCD(int x, int y)
{
	int z = 0;
	while (z = x % y)
	{
		x = y;
		y = z;
	}
	return y;
}